package com.yunhan.config;

import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
import io.swagger.v3.oas.annotations.OpenAPIDefinition;
import io.swagger.v3.oas.annotations.info.Info;
import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableKnife4j
@OpenAPIDefinition(info = @Info(title = "云汉平台API文档",
        description = "云汉平台API接口文档",
        version = "1.0.0"))
public class SwaggerConfig {

    @Bean
    public OpenAPI customOpenAPI() {
        return new OpenAPI()
                .components(new Components())
                .info(new io.swagger.v3.oas.models.info.Info()
                        .title("云汉平台API文档")
                        .version("1.0.0")
                        .description("云汉平台API接口文档，提供完整的业务接口说明和调用示例"));
    }
}
